package com.yuxinmuyu.sports_management.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yuxinmuyu.sports_management.bean.entiy.SportsApply;
import com.yuxinmuyu.sports_management.bean.response.SportsApplyResponse;
import com.yuxinmuyu.sports_management.bean.response.SportsProjectResponse;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

public interface SportsApplyMapper extends BaseMapper<SportsApply> {

    Page<SportsApplyResponse> getSportsApply(Page<SportsApplyResponse> page, @Param("yearTermID") String yearTermID, @Param("sportsID") Integer sportsID, @Param("keyword") String keyword, @Param("deptID")String deptID);

    List<SportsProjectResponse> getSports(@Param("yearTermID") String yearTermID);

    int callDeleteSportsApply(Integer applyID);

    Page<SportsApplyResponse> getSportsApply1(Page<SportsApplyResponse> page, String yearTermID, Integer sportsID, String keyword, String deptID);
    int  insertSportsApply(@Param("yearTermID") String yearTermID,
                           @Param("sportsID") Integer sportsID,
                           @Param("userID") String userID,
                           @Param("flag") Integer flag,
                           @Param("lastDate") Date lastDate,
                           @Param("operator") String operator);

    int callUpdate(Integer applyID, String yearTermID, Integer sportsID, String userID, Integer flag, Date lastDate, String operator);
}
